<template>
  <div style="width: 700px">
    <el-table
      :data="tableData"
      v-loading="isLoading"
      element-loading-text="拼命加载中"
      element-loading-spinner="el-icon-loading"
    >
      <el-table-column prop="mobile" label="手机号" width="180"></el-table-column>
      <el-table-column prop="loginName" label="手机号" width="180"></el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button size="mini" @click="handleEdit(scope.row._id)">编辑</el-button>
          <el-button size="mini" type="danger" @click="handleDelete(scope.row._id)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
import userApi from "../services/user.js";
export default {
  data() {
    return {
       tableData:[] 
    }
  },
 async created(){
    const res= await userApi.getUserAll()
      
      this.tableData=res.data
   
  }
};
</script>
